Method and device for determining vehicle site location

ABSTRACT

A method and a device for determining a vehicle site location are disclosed in the present disclosure. The method includes: obtaining location information of multiple users and location information of at least two central points; calculating a distance between each user and each of the at least two central points according to the location information of multiple users and the location information of at least two central points; clustering the multiple users into at least two groups according to the distance; updating the location information of the central point according to the location information of the users in each group; if the location information of the central point satisfies a preset condition, determining the vehicle site location according to the location information of the central points and the number of the users in each group.

CROSS REFERENCE TO RELATED APPLICATION

This application is based upon and claims a priority to Chinese PatentApplication Serial No. 201610003607.4, filed with the State IntellectualProperty Office of P.R. China on Jan. 4, 2016, the entire contents ofwhich are incorporated herein by reference.

FIELD

The present disclosure relates to information network technology field,and more specifically to a method and a device for determining a vehiclesite location.

BACKGROUND

Public transportation is one common way to travel for people in a dailylife, e.g. people usually take a shuttle bus for commuting. Users aregenerally informed orally of stopping time and location of the shuttlebuses, and then the users can wait for the shuttle buses atpre-determined time and location.

However, the shuttle bus may not be able to arrive and the predeterminedlocation at the predetermined time, since traffic condition may changeand special cases may occur. Similarly, the user who needs to take theshuttle bus may not be able to find the predetermined location and missthe shuttle bus because of, for example, being unfamiliar with theroads. In addition, the stopping location of the shuttle bus does notconsider demands of all the users, such that the stopping site of theshuttle bus usually cannot satisfy the demand of the users.

SUMMARY

The present disclosure seeks to solve at least one of the problemsexisting in the related art to at least some extent.

For this, according to a first aspect of embodiments of the presentdisclosure, a method for determining a vehicle site location isproposed. The method includes: obtaining location information ofmultiple users and location information of at least two central points;calculating a distance between each user and each of the at least twocentral points according to the location information of multiple usersand the location information of at least two central points; clusteringthe multiple users into at least two groups according to the distances;updating the location information of the central point according to thelocation information of the users in each group; if the locationinformation of the central point satisfies a preset condition,determining the vehicle site location according to the locationinformation of the central points and a number of the users in eachgroup.

According to a second aspect of embodiments of the present disclosure, adevice for determining a vehicle site location is proposed. The deviceincludes one or more computing devices executing one or more softwaremodules, and the one or more software modules includes: an obtainingmodule, configured to obtain location information of multiple users andlocation information of at least two central points; a calculatingmodule, configured to calculate a distance between each user and each ofthe at least two central points according to the location information ofmultiple users and the location information of at least two centralpoints; a clustering module, configured to cluster the multiple usersinto at least two groups according to the distances; an updating module,configured to update the location information of the central pointaccording to the location information of the users in each group; and adetermining module, configured to determine the vehicle site locationaccording to the location information of the central points and thenumber of the users in each group if the location information of thecentral point satisfies the preset condition.

According to a third aspect of embodiments of the present disclosure, anon-transitory computer readable storage medium is proposed. The storagemedium has stored therein instructions, that when executed by aprocessor of a terminal, cause the terminal to perform the abovedescribed method for determining the vehicle site location.

With the present disclosure, the vehicle site location may be set morereasonably and satisfies the user's demand, thus making it convenientfor the user's travel.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of a method for determining a vehicle sitelocation according to an embodiment of the present disclosure.

FIG. 2 is a block diagram of a device for determining a vehicle sitelocation according to an embodiment of the present disclosure.

FIG. 3 is a block diagram of a device for determining a vehicle sitelocation according to another embodiment of the present disclosure.

DETAILED DESCRIPTION

Exemplary embodiments will be described in detail herein, and examplesthereof are illustrated in accompanying drawings. Throughout figuresreferred by the following description, the same reference number indifferent figures indicates the same or similar elements unlessotherwise stated. Implementations described in the following exemplaryembodiments do not represent all the implementations consistent with thepresent disclosure. Instead, they are only examples of the device andmethod consistent with some aspects of the present disclosure detailedin the appended claims.

A method and a device for determining a vehicle site location accordingto embodiments of the present disclosure will be described hereinafterwith reference to drawings.

FIG. 1 is a flow chart of a method for determining a vehicle sitelocation according to an embodiment of the present disclosure.

As shown in FIG. 1, the method for determining the vehicle site locationmay include following steps.

In step S1, location information of multiple users and locationinformation of at least two central points are obtained.

The location information of the user may be obtained via a GPS (GlobalPositioning System) of a mobile terminal used by the user. The locationinformation of the at least two central points are preset, for example,according to location information of all the users. For example, thedistribution of the users in a map may be obtained, and coordinates oftwo points are randomly chosen in a region with relatively densedistribution and regarded as the location information of two centralpoints.

In step S2, a distance between each user and each of the at least twopredetermined central points is calculated according to the locationinformation of multiple users and the location information of at leasttwo central points.

Specifically, the distance between each user and each of the at leasttwo central points may be calculated according to a following formula:AB=R*arc cos [sin(wA)sin(wB)+cos(wA)cos(wB)*cos(jA−jB)],where, AB is a distance between a user A and a central point B, wA is alatitude of the user A, jA is a longitude of the user A, wB is alatitude of the central point B, jB is a longitude of the central pointB, and R is a radius of the earth.

For example, assuming there are two central points M and N, a distancebetween User 1 and the central point M is calculated as M1, a distancebetween User 1 and the central point N is calculated as N1, a distancebetween User 2 and the central point M is calculated as M2, and adistance between User 2 and the central point N is calculated as N2, andso on.

In step S3, the multiple users are clustered into at least two groupsaccording to the distances.

Taking the same two central points M and N as an example, distance M1 iscompared to distance N1. When distance M1 is less than distance N1, User1 may be divided to group M; when distance M1 is larger than distanceN1, User 1 may be divided to group N. In the same manner, each user maybe clustered to a group which is nearest in distance.

In step S4, the location information of the central point is updatedaccording to the location information of the users in the group.

Specifically, an average value of the location information of the usersin each group may be calculated, and the average value is regarded asthe location information of the central point of the group. For example,assuming group M contains three users and the location information ofthe three users is (x1, y1), (x2, y2), and (x3, y3), then the locationinformation of the central point of group M is ((x1+x2+x3)/3,(y1+y2+y3)/3), such that the updating of the location information of thecentral point is completed.

In step S5, it is determined whether the location information of thecentral point satisfies a preset condition. If yes, step S6 iscontinued, and otherwise, step S1 to step S4 are repeated until thepredetermined condition is satisfied.

Since the location information of the updated central point changes, thedistance between the updated central point and each user changes, andgrouping of the users also changes. Therefore, there is a need tore-calculate the distance between the updated central point and eachuser, to group the users according to the re-calculated distances, andto iteratively update the location information of the central pointuntil the preset condition is satisfied. The preset condition may bethat the number of iterations reaches 5 times; and may also be that thenumber of users that changed in each group is less than a preset numberlike 5, etc.

In step S6, the vehicle site location is determined according to thelocation information of the central point and the number of the users ineach group.

Specifically, if the preset condition is satisfied, the number of theusers in each group may be obtained, a weight of the group is determinedaccording to the number, and then the vehicle site location isdetermined according to the location information of the central pointfor each group and the number of the users in each group. For example,assuming that the current users are divided into two groups, a usernumber of group M is 40, and a user number of group N is 10. Thelocation information of all the users in group M are obtained, and theaverage value of the location information of the 40 users is calculatedand obtained as the location information of the central point of groupM. Similarly, the location information of all the users in group N areobtained, and the average value of the location information of the 10users is calculated and obtained as the location information of thecentral point of group N. Then, the distance between the central pointof group M and the central point of group N is calculated according tothe formula in step 2. Since there are 40 users in group M and 10 usersin group N, the weight of group M may be 4, the weight of group N may be1, and a ratio between the weight of group M and the weight of group Nis 4:1. Assuming the distance between the central point of group M andthe central point of group N is 100 m, then the vehicle site locationmay be calculated according to the ratio, which is 20 m away from thecentral point of group M and 80 m away from the central point of groupN. If the calculated vehicle site location is not on a road in the map,a location on the nearest road and at which a vehicle can stop may bechosen as the vehicle site location.

After the vehicle site location is calculated, information of thevehicle site location may be sent to multiple users, such that the usercan receive the vehicle stopping information such as a specific locationof an arriving site and an arriving time in time, thus avoiding theproblem of being unable to catch up with the vehicle.

According to the method for determining the vehicle site location inembodiments of the present disclosure, the vehicle site location may beset more reasonably and satisfies the user's demand, thus making itconvenient for the user's travel.

The present disclosure further provides a device for determining avehicle site location.

FIG. 2 is a block diagram of a device for determining a vehicle sitelocation according to an embodiment of the present disclosure

As shown in FIG. 2, the device for determining the vehicle site locationmay include: an obtaining module 110, a calculating module 120, aclustering module 130, an updating module 140 and a determining module150.

The obtaining module 110 is configured to obtain location information ofmultiple users and location information of at least two central points.

The location information of the user may be obtained via a GPS (GlobalPositioning System) of a mobile terminal used by the user. The locationinformation of the at least two central points are preset, for example,according to location information of all the users. For example, thedistribution of the users in a map may be obtained, and in a region withrelatively dense distribution, coordinates of two points may be randomlychosen and regarded as the location information of two central points.

The calculating module 120 is configured to calculate a distance betweeneach user and each of the at least two central points according to thelocation information of multiple users and the location information ofat least two central points.

Specifically, the distance between each user and each of the at leasttwo central points may be calculated according to a following formula:AB=R*arc cos [sin(wA)sin(wB)+cos(wA)cos(wB)*cos(jA−jB)],where, AB is a distance between a user A and a central point B, wA is alatitude of the user A, jA is a longitude of the user A, wB is alatitude of the central point B, jB is a longitude of the central pointB, and R is a radius of the earth.

For example, assuming there are two central points M and N, a distancebetween User 1 and the central point M is calculated as M1, a distancebetween User 1 and the central point N is calculated as N1, a distancebetween User 2 and the central point M is calculated as M2, and adistance between User 2 and the central point N is calculated as N2, andso on.

The clustering module 130 is configured to cluster the multiple usersinto at least two groups according to the distances.

Taking the same two central points M and N as an example, distance M1 iscompared to distance N1. When distance M1 is less than distance N1, User1 may be divided to group M; when distance M1 is larger than distanceN1, User 1 may be divided to group N. In the same manner, each user maybe clustered to a group which is nearest in distance.

The updating module 140 is configured to update the location informationof the central point according to the location information of the usersin each group.

Specifically, an average value of the location information of the usersin each group may be calculated, and the average value is regarded asthe location information of the central point. For example, assuminggroup M contains three users and the location information of the threeusers is (x1, y1), (x2, y2), and (x3, y3), then the location informationof the central point of group M is ((x1+x2+x3)/3, (y1+y2+y3)/3), suchthat the updating of the location information of the central point iscompleted.

The determining module 150 is configured to determine the vehicle sitelocation according to the location information of the central points andthe number of the users in each group if the location information of thecentral point satisfies the preset condition.

Specifically, if the preset condition is satisfied, the number of theusers in each group may be obtained, a weight of the group is determinedaccording to the number, and then the vehicle site location isdetermined according to the location information of the central pointfor each group and the number of the users in each group. For example,assuming that the current users are divided into two groups, a usernumber of group M is 40, and a user number of group N is 10. Thelocation information of all the users in group M are obtained, and theaverage value of the location information of the 40 users is calculatedand obtained as the location information of the central point of groupM. Similarly, the location information of all the users in group N areobtained, and the average value of the location information of the 10users is calculated and obtained as the location information of thecentral point of group N. Then, the distance between the central pointof group M and the central point of group N is calculated according tothe formula in step 2. Since there are 40 users in group M and 10 usersin group N, the weight of group M may be 4, the weight of group N may be1, and a ratio between the weight of group M and the weight of group Nis 4:1. Assuming the distance between the central point of group M andthe central point of group N is 100 m, then the vehicle site locationmay be calculated according to the ratio, which is 20 m away from thecentral point of group M and 80 m away from the central point of groupN. If the calculated vehicle site location is not on a road in the map,a location on the nearest road and at which a vehicle can stop may bechosen as the vehicle site location.

In addition, as shown in FIG. 3, the device for determining the vehiclesite location in the embodiments of the present disclosure may furtherinclude a sending module 160.

The sending module 160 is configured to send information of the vehiclesite location to the multiple users after the determining module 150determines the vehicle site location, such that the user can receive thevehicle stopping information such as a specific location of an arrivingsite and an arriving time in time, thus avoiding the problem of beingunable to catch up with the vehicle.

According to the device for determining the vehicle site location inembodiments of the present disclosure, the vehicle site location may beset more reasonably and satisfies the user's demand, and it isconvenient for the user's travel.

It should be noted that, in the description of the present disclosure,terms such as “first” and “second” are used herein for purposes ofdescription and are not intended to indicate or imply relativeimportance or significance. In addition, in the description of thepresent disclosure, “a plurality of” means two or more than two, unlessspecified otherwise.

Any process or method described in a flow chart or described herein inother ways may be understood to include one or more modules, segments orportions of codes of executable instructions for achieving specificlogical functions or steps in the process, and the scope of a preferredembodiment of the present disclosure includes other implementations,which may not follow a shown or discussed order according to the relatedfunctions in a substantially simultaneous manner or in a reverse order,to perform the function, which should be understood by those skilled inthe art.

It should be understood that each part of the present disclosure may berealized by the hardware, software, firmware or their combination. Inthe above embodiments, a plurality of steps or methods may be realizedby the software or firmware stored in the memory and executed by theappropriate instruction execution system. For example, if it is realizedby the hardware, likewise in another embodiment, the steps or methodsmay be realized by one or a combination of the following techniquesknown in the art: a discrete logic circuit having a logic gate circuitfor realizing a logic function of a data signal, an application-specificintegrated circuit having an appropriate combination logic gate circuit,a programmable gate array (PGA), a field programmable gate array (FPGA),etc.

Those skilled in the art shall understand that all or parts of the stepsin the above exemplifying method of the present disclosure may beachieved by commanding the related hardware with programs. The programsmay be stored in a computer readable storage medium, and the programscomprise one or a combination of the steps in the method embodiments ofthe present disclosure when run on a computer.

In addition, each function cell of the embodiments of the presentdisclosure may be integrated in a processing module, or these cells maybe separate physical existence, or two or more cells are integrated in aprocessing module. The integrated module may be realized in a form ofhardware or in a form of software function modules. When the integratedmodule is realized in a form of software function module and is sold orused as a standalone product, the integrated module may be stored in acomputer readable storage medium.

The storage medium mentioned above may be read-only memories, magneticdisks, CD, etc.

Reference throughout this specification to “an embodiment,” “someembodiments,” “one embodiment”, “another example,” “an example,” “aspecific example,” or “some examples,” means that a particular feature,structure, material, or characteristic described in connection with theembodiment or example is included in at least one embodiment or exampleof the present disclosure. Thus, the appearances of the phrases such as“in some embodiments,” “in one embodiment”, “in an embodiment”, “inanother example,” “in an example,” “in a specific example,” or “in someexamples,” in various places throughout this specification are notnecessarily referring to the same embodiment or example of the presentdisclosure. Furthermore, the particular features, structures, materials,or characteristics may be combined in any suitable manner in one or moreembodiments or examples.

Although explanatory embodiments have been shown and described, it wouldbe appreciated by those skilled in the art that the above embodimentscannot be construed to limit the present disclosure, and changes,alternatives, and modifications can be made in the embodiments withoutdeparting from spirit, principles and scope of the present disclosure.

What is claimed is:
 1. A method for determining a vehicle site location,comprising: obtaining location information of multiple users andlocation information of at least two central points; calculating adistance between each user and each of the at least two central pointsaccording to the location information of multiple users and the locationinformation of at least two central points; clustering the multipleusers into at least two groups according to the distances; updating thelocation information of the central point according to the locationinformation of the users in each group; determining whether the locationinformation of the central point satisfies a preset condition, thepreset condition being that the number of iterations reaches five timesor the number of users that changed in each group is less than a presetnumber; in response to determining that the location information of thecentral point does not satisfy the preset condition, repeating theobtaining, the calculating, the clustering, the updating and thedetermining whether the location information of the central pointsatisfies a preset condition; and in response to determining that thelocation information of the central point satisfies the presetcondition, determining the vehicle site location according to thelocation information of the central points and a number of the users ineach group.
 2. The method according to claim 1, wherein, the distancebetween each user and each of the at least two central points iscalculated according to a formula ofAB=R*arc cos [sin(wA)sin(wB)+cos(wA)cos(wB)*cos(jA−jB)], where, AB isthe distance between a user A and a central point B, wA is a latitude ofthe user A, jA is a longitude of the user A, wB is a latitude of thecentral point B, jB is a longitude of the central point B, and R is aradius of the earth.
 3. The method according to claim 1, wherein,updating the location information of the central point according to thelocation information of the users in each group comprises: calculatingan average value of the location information of the users in each group,and updating the location information of the central point according tothe average value.
 4. The method according to claim 1, wherein,determining the vehicle site location according to the locationinformation of the central points and the number of the users in eachgroup comprises: obtaining the number of users in each group, anddetermining a weight of each group according to the number of users ineach group; and calculating the vehicle site location according to theweight and the location information of the central points.
 5. The methodaccording to claim 4, further comprising: sending information of thevehicle site location to the multiple users.
 6. A device for determininga vehicle site location, comprising: one or more computing devicesexecuting one or more software modules, the one or more software modulescomprising: an obtaining module, configured to obtain locationinformation of multiple users and location information of at least twocentral points; a calculating module, configured to calculate a distancebetween each user and each of the at least two central points accordingto the location information of multiple users and the locationinformation of at least two central points; a clustering module,configured to cluster the multiple users to at least two groupsaccording to the distances; an updating module, configured to update thelocation information of the central point according to the locationinformation of the users in each group; and a determining module,configured to determine whether the location information of the centralpoint satisfies a preset condition, the preset condition being that thenumber of iterations reaches five times or the number of users thatchanged in each group is less than a preset number, to repeat theobtaining module, the calculating module, the clustering module, theupdating module and the determining module in response to determiningthat the location information of the central point does not satisfy thepreset condition, and to determine the vehicle site location accordingto the location information of the central point and a number of theusers in each group in response to determining that the locationinformation of the central point satisfies the preset condition.
 7. Thedevice according to claim 6, wherein, the calculating module isconfigured to calculate the distance between each user and each of theat least two central points according to a formula ofAB=R*arc cos [sin(wA)sin(wB)+cos(wA)cos(wB)*cos(jA−jB)], where, AB is adistance between a user A and a central point B, wA is a latitude of theuser A, jA is a longitude of the user A, wB is a latitude of the centralpoint B, jB is a longitude of the central point B, and R is a radius ofthe earth.
 8. The device according to claim 6, wherein, the updatingmodule is configured to: calculate an average value of the locationinformation of the user in each group; and update the locationinformation of the central point according to the average value.
 9. Thedevice according to claim 6, wherein, the determining module isconfigured to: obtain the number of users in each group, and determine aweight of the group according to the number; and calculate the vehiclesite location according to the weight and the location information ofthe central point.
 10. The device according to claim 9, wherein the oneor more software modules further comprises: a sending module, configuredto send information of the vehicle site location to the multiple users.11. A non-transitory computer readable storage medium having storedtherein instructions that, when executed by a processor of a terminal,cause the terminal to perform a method for determining a vehicle sitelocation, the method comprising: obtaining location information ofmultiple users and location information of at least two central points;calculating a distance between each user and each of the at least twocentral points according to the location information of multiple usersand the location information of at least two central points; clusteringthe multiple users into at least two groups according to the distances;updating the location information of the central point according to thelocation information of the users in each group; determining whether thelocation information of the central point satisfies a preset condition,the preset condition being that the number of iterations reaches fivetimes or the number of users that changed in each group is less than apreset number; in response to determining that the location informationof the central point does not satisfy the preset condition, repeatingthe obtaining, the calculating, the clustering, the updating and thedetermining whether the location information of the central pointsatisfies a preset condition; and in response to determining that thelocation information of the central point satisfies the presetcondition, determining the vehicle site location according to thelocation information of the central points and a number of the users ineach group.